﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;


namespace FinalTestMachine.View.Dispenser
{
    /// <summary>
    /// UserControl_ThreeAixs.xaml 的交互逻辑
    /// </summary>
    public partial class UserControl_ThreeAixs : UserControl
    {
        public UserControl_ThreeAixs()
        {
            InitializeComponent();
            IUserLimitdll.PreControlBindingHelper.SetLitmitBinding(this, IUserLimitdll.UserLevelModes.ModifyAndOperation);

        }
        bool IsCanShow = false;

        public void ShowUI()
        {
            if (!IsCanShow) return;
            //tb_FollowAngle.Text = ArcHelper.Cur_arcHelper.CurAngle.ToString();
            //tb_DxPhoto.Text = CameraHelper.DxPhoto.GetValue.ToString();
            //tb_DyPhoto.Text = CameraHelper.DyPhoto.GetValue.ToString();
            //tb_MeasureDz.Text = MeasureHeightHelper.Cur.Z_MeasureDz.GetValue.ToString();
        }

        private void Btn_MeasureWindow_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Wnd_MeasureXYViewModel measureXYViewModel = new Wnd_MeasureXYViewModel();

                measureXYViewModel.Owner = Window.GetWindow(this);
                measureXYViewModel.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                measureXYViewModel.ShowDialog();


            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            IsCanShow = true;
        }

        private void UserControl_Unloaded(object sender, RoutedEventArgs e)
        {
            IsCanShow = false;

        }
    }
}
